< previous page page_432 next page >

Page 432
12181-0432a.gif
Figure 15.7.
Displaying a calendar in Microsoft Access for the user to select a date.
In fact, Visual Basic 5 had an unsupported Calendar control included on the CD-ROM. Now, with Visual Basic 6, there are two new controls that give the programmer the most robust date interaction yet possible. The following are the two new controls:
MonthViewThis control makes it easy for users to view and set date information using a calendar interface.
DateTimePickerThis control displays date and/or time information and allows the user to modify this information.
Each of these controls address a particular date display function as discussed in the following sections.
The MonthView Control
The MonthView control should be used whenever you want to display date information to the user in an easy-to-follow calendar-style format. Allowing the user to choose a date using the mouse, instead of typing a date value, makes it easier to work with dates within an application. In addition to the standard one month view, this control has the ability to display up to 12 months at one time on a form. This feature can be used when you want to give the users the ability to view date information around a specified date. Figure 15.8 shows the MonthView control's display.

 
< previous page page_432 next page >

If you like this book, buy it!